package com.foshanshop.ejb3.dao.impl;

import java.io.Serializable;
import java.util.List;

import org.hibernate.Query;

import com.b2besoft.po.TestDalDs;
import com.dhgate.common.dao.impl.HibernateDAOImpl;
import com.foshanshop.ejb3.dao.DalDAO;

public class DalDAOImpl extends HibernateDAOImpl implements DalDAO
{

    public int getTestDalDs() {
        TestDalDs po = null;
        String sql = "from TestDalDs a";
        Query q = session.createQuery(sql);
        List reList=q.list();
        return  reList.size();
//        if(reList!=null && reList.size()>0){
//              po =(TestDalDs)reList.get(0);
//        }
//        if(po==null)
//            return null;
//        return po;
    }

    public void save(TestDalDs user) {
        Serializable a =  session.save(user);
        System.out.println(a);
    }
}